package cn.sytton.taffe.framework.properties.db;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.context.annotation.Configuration;

/**
 * yml配置类：db(数据库配置提升到顶级)
 *
 * @author skyrock
 */
@Configuration
@ConfigurationProperties(prefix = "db")
@EnableConfigurationProperties(DBProperties.class)
public class DBProperties {

    @NestedConfigurationProperty
    private DBConfigProperties master;

    @NestedConfigurationProperty
    private DBConfigProperties log;

    public DBConfigProperties getMaster() {
        return master;
    }

    public void setMaster(DBConfigProperties master) {
        this.master = master;
    }

    public DBConfigProperties getLog() {
        return log;
    }

    public void setLog(DBConfigProperties log) {
        this.log = log;
    }
}
